home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-3418
/
gfa_prog.s
/
unpakmed.lst
< prev
Wrap
File List
|
1986-02-05
|
3KB
|
69 lines
' ****************************************
' * Listing from DBA Diskmagazine 3 *
' * *
' * Med-res Degas picture loader *
' * and un-packer in GFA *
' * Converted from Hi-soft basic -> GFA *
' * Program by Bonus Software *
' * *
' ****************************************
'
sc%=XBIOS(3) ! start address screen
'
DO
SHOWM ! showm mouse
FILESELECT "a:\pictures\*.pc2","default.pc1",a$ ! fileselector to choose pic.
IF a$<>"" ! if exists
HIDEM ! hide mouse
OPEN "i",#1,a$ ! open picture
dummy$=INPUT$(2,#1) ! read first 2 usless (to us)
' ! bytes.
FOR i%=0 TO 3 ! for next to get the 4 colors
c%=256*ASC(INPUT$(1,#1))+ASC(INPUT$(1,#1))! make decimal value of it
SETCOLOR i%,c% ! setcolor to the value
NEXT i% ! get next color
dummy$=INPUT$(24,#1) ! read rest of usless colors
scr%=sc% ! copy screen address in scr%
FOR scan%=0 TO 199 ! for next for number of lines
FOR plane%=0 TO 2 STEP 2 ! for next for number of bit
' ! planes ( med res 2 planes )
addr%=scr%+160*scan%+plane% ! screen counter
volg%=addr%+160 ! screen counter + 1 line
DO ! start unpacking
b%=ASC(INPUT$(1,#1))
IF b%<128
FOR i%=0 TO b%
POKE addr%,ASC(INPUT$(1,#1))
IF addr% AND 1
addr%=addr%+3
ELSE
INC addr%
ENDIF
NEXT i%
ENDIF
IF b%>128
tel%=ASC(INPUT$(1,#1))
FOR i%=1 TO 256-b%+1
POKE addr%,tel%
IF addr% AND 1
addr%=addr%+3
ELSE
INC addr%
ENDIF
NEXT i%
ENDIF
EXIT IF addr%=volg%
LOOP
NEXT plane%
NEXT scan%
CLOSE #1
OUT 2,7
~INP(2)
CLS
SETCOLOR 0,0
SETCOLOR 15,7,7,7
ELSE
END
ENDIF
LOOP